public class se {

}
sealed class Dog{

}
non-sealed class Patdog extends Dog{

}

sealed class Animal permits Cat{

}
non-sealed class Cat extends Animal{

}